#include "udpClient.hpp"
#include <memory>

using namespace Client;

// 提示 运行格式
static void Usage(string proc)
{
    cout<<"Usage:\n\t" << proc <<" Server_ip Server_port\n\n";
}
// ./udpClient Server_ip Server_port
int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    string Serverip = argv[1];
    uint16_t Serverport = atoi(argv[2]);

    unique_ptr<udpClient> uclt(new udpClient(Serverip,Serverport));

    uclt->initClient(); //初始化客户端
    uclt->run();        //运行客户端


    return 0;
}